package com.mrjy.maintain.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.mrjy.common.dto.SMSSendDto;
import com.mrjy.common.entity.SMSSendInfo;
import com.mrjy.maintain.bo.ISMSSendInfoBo;

@Controller()
@RequestMapping("maintain/smsSendInfo")
public class SMSSendInfoController {
	@Resource
	private ISMSSendInfoBo smsSendInfoBo;
	
	/**
	 * 发送验证码
	 * @return
	 */
	@RequestMapping("/sendSMS")
	@ResponseBody
	public Object sendSMS(HttpSession session,SMSSendDto smsSendDto) {
		return smsSendInfoBo.sendSMS(smsSendDto);
	}
	
	/**
	 * 验证验证码
	 * @return
	 */
	@RequestMapping("/validateSMSCode")
	@ResponseBody
	public Object validateSMSCode(HttpSession session,SMSSendInfo smsSendInfo) {
		return smsSendInfoBo.validateSMSCode(smsSendInfo);
	}
}
